

package com.hazelcast.nio.serialization.impl;

import com.hazelcast.nio.serialization.IdentifiedDataSerializable;
import com.hazelcast.version.Version;

/**
 * An extension to {@link IdentifiedDataSerializable}, which makes it possible
 * to report different class IDs depending on the cluster version.
 *
 * @since 5.4
 */
public interface VersionedIdentifiedDataSerializable extends IdentifiedDataSerializable, Versioned {

    int getClassId(Version clusterVersion);

    @Override
    default int getClassId() {
        throw new UnsupportedOperationException();
    }
}
